package com.shop.utils;

import java.sql.SQLException;
import java.util.List;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanListHandler;

public class PageUtil {

	public static void getPage(){
		String sql = " select * from customer order by id limit ?, ?";
		
		int start = 10;
		int len = 10;
		
		try {
			QueryRunner queryRunner = new QueryRunner(JDBCUtils.getDataSource());
			List<Object> query = queryRunner.query(sql, new BeanListHandler<Object>(Object.class), start,len);
		} catch (SQLException e) {
			e.printStackTrace();
		}
		
	}
}
